<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddCompanyDepartmentToSignInRecords extends Migration
{
    public function up()
    {
        Schema::table('sign_in_records', function (Blueprint $table) {
            $table->string('company', 255)->nullable()->after('team_name')->comment('公司');
            $table->string('department', 255)->nullable()->after('company')->comment('部门');
        });
    }

    public function down()
    {
        Schema::table('sign_in_records', function (Blueprint $table) {
            $table->dropColumn(['company', 'department']);
        });
    }
}
